Display a floating number in specified numbersΒΆ

Display a floating number in specified numbers.
order_amt = 212.374

print('\nThe total order amount comes to %f' % order_amt)
print('The total order amount comes to %.2f' % order_amt)

Output:

The total order amount comes to 212.374000
The total order amount comes to 212.37